package pers.course.week11;

import java.util.Scanner;

class ListNode {
    public int value;
    ListNode next;

    ListNode() {
    }

    ListNode(int x) {
        value = x;
    }

    public void add(int x) {
        ListNode l = new ListNode(x);
        if (this.next == null) this.next = l;
        else this.next.add(x);
    }
}

public class LinkAdd {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.nextLine();
        String b = in.nextLine();
        int[] aa = new int[10];
        int[] bb = new int[10];
        ListNode root1 = new ListNode();
        ListNode root2 = new ListNode();
        ListNode root3 = new ListNode();
        for (int i = 0; i < a.length(); i++) {
            aa[i] = Integer.parseInt(String.valueOf(a.charAt(i)));
            if (i == 0) {
                root1.value = (int) aa[0];
            } else {
                root1.add(aa[i]);
            }
        }
        for (int i = 0; i < b.length(); i++) {
            bb[i] = Integer.parseInt(String.valueOf(b.charAt(i)));
            if (i == 0) {
                root2.value = bb[0];
            } else {
                root2.add(bb[i]);
            }
        }
        int flag = 0, num = 0;
        while (root1 != null && root2 != null) {
            System.out.print((root1.value + root2.value + flag) % 10);
            if (root1.value + root2.value + flag >= 10) {
                flag = 1;
            } else {
                flag = 0;
            }
            root1 = root1.next;
            root2 = root2.next;
        }
        if (root1 != null) {
            System.out.print((root1.value + flag) % 10);
        }
        if (root2 != null) {
            System.out.print((root2.value + flag) % 10);
        }
        System.out.println();
    }
}